package com.star.star.view;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ListView;

import androidx.appcompat.app.AppCompatActivity;

import com.star.star.R;

public class starView {
    private View view;
    private AppCompatActivity context;
    public starView(AppCompatActivity context){
        this.context=context;
        LayoutInflater layoutInflater=LayoutInflater.from(context);
        view=layoutInflater.inflate(R.layout.activity_star,null);
        initView();
    }

    private void initView() {
        FrameLayout fl_adbanner = view.findViewById(R.id.fl_adbanner);
        //生成广告内容，传给广告栏对象
        int adsId[] = {R.drawable.banner_1, R.drawable.banner_2, R.drawable.banner_3};
        ViewPage ViewPage = new ViewPage(context, adsId);
        fl_adbanner.addView(ViewPage.getView());

       // ListView listView=view.findViewById(R.id.lv_chart);

    }
}
